package com.itpengwei.proxy;

/**
 * @author: pengwei
 * @date: 2019/12/3 6:53 下午
 */
public class Proxy implements Sourceable {


    private Sourceable sourceable;

    public Proxy() {
        this.sourceable = new Source();
    }

    @Override
    public void method() {
        before();
        sourceable.method();
        after();
    }

    public void after() {
        System.out.println("====代理后置====");
    }

    public void before() {
        System.out.println("====代理后置====");
    }
}
